package com.whfc.fse.dao;

import com.whfc.fse.dto.FseWarnObjectDTO;
import com.whfc.fse.entity.FseWarnRuleObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FseWarnRuleObjectMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(FseWarnRuleObject record);

    int insertSelective(FseWarnRuleObject record);

    FseWarnRuleObject selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(FseWarnRuleObject record);

    int updateByPrimaryKey(FseWarnRuleObject record);

    /**
     * 报警对象ID列表
     *
     * @param ruleId
     * @return
     */
    List<String> selectByRuleId(@Param("ruleId") Integer ruleId);

    /**
     * 报警对象列表(塔机)
     *
     * @param ruleId
     * @return
     */
    List<FseWarnObjectDTO> selectCraneDTOByRuleId(@Param("ruleId") Integer ruleId);

    /**
     * 报警对象列表(升降机)
     *
     * @param ruleId
     * @return
     */
    List<FseWarnObjectDTO> selectLiftDTOByRuleId(@Param("ruleId") Integer ruleId);

    void deleteLogicByRuleId(@Param("ruleId") Integer ruleId);

    void batchInsert(@Param("list") List<FseWarnRuleObject> list);
}